﻿using System;
using System.IO;
using System.Threading;
using System.Globalization;
using System.ComponentModel;
using System.Reflection;
using System.Collections.Generic;
using System.Net;
using System.Linq;
using System.Xml.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using System.Windows.Resources;

using SBPweb.RIA.Shared.Contracts.Models;

using SBPweb.RIA.Client.Contracts.Base;
using SBPweb.RIA.Client.Contracts.Models;

using SBPweb.RIA.Client.Controls.Base;

namespace SBPweb.RIA.Client.Controls.Models
{

    public class PackageLoaderModel : ModelBase, IPackageLoaderModel
    {
        
        #region Private fields

        #endregion

        #region Constructor logic

        internal PackageLoaderModel()
            : base()
        {
        }

        #endregion

        #region Dependency properties

        public static readonly DependencyProperty FormProperty = DependencyProperty.Register("Form", typeof(UIElement), typeof(IPackageLoaderModel), null);

        #endregion

        #region Property accessors

        public UIElement Form
        {
            get
            {
                return GetTypedValue<UIElement>(FormProperty);
            }
            protected set
            {
                SetTypedValue<UIElement>(FormProperty, value, "Form", FormChanged);
            }
        }

        #endregion

        #region Events

        public event EventHandler FormChanged;

        #endregion

        #region Methods

        internal void SetFormElement(UIElement element)
        {
            Form = element;
        }

        #endregion

    }

}